package com.simple.datax.db.mybatis.model;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * @author paladin
 * 
 */
public class DataxRecvRawMsg implements Serializable {
    private String id;

    private String recvFileName;

    private String recvDataType;

    private String communType;

    private String communParam;

    private Date backupTime;

    private Long dataSize;

    private Short status;

    private String msgCharset;

    private String msgType;

    private byte[] msgData;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getRecvFileName() {
        return recvFileName;
    }

    public void setRecvFileName(String recvFileName) {
        this.recvFileName = recvFileName == null ? null : recvFileName.trim();
    }

    public String getRecvDataType() {
        return recvDataType;
    }

    public void setRecvDataType(String recvDataType) {
        this.recvDataType = recvDataType == null ? null : recvDataType.trim();
    }

    public String getCommunType() {
        return communType;
    }

    public void setCommunType(String communType) {
        this.communType = communType == null ? null : communType.trim();
    }

    public String getCommunParam() {
        return communParam;
    }

    public void setCommunParam(String communParam) {
        this.communParam = communParam == null ? null : communParam.trim();
    }

    public Date getBackupTime() {
        return backupTime;
    }

    public void setBackupTime(Date backupTime) {
        this.backupTime = backupTime;
    }

    public Long getDataSize() {
        return dataSize;
    }

    public void setDataSize(Long dataSize) {
        this.dataSize = dataSize;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public String getMsgCharset() {
        return msgCharset;
    }

    public void setMsgCharset(String msgCharset) {
        this.msgCharset = msgCharset == null ? null : msgCharset.trim();
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType == null ? null : msgType.trim();
    }

    public byte[] getMsgData() {
        return msgData;
    }

    public void setMsgData(byte[] msgData) {
        this.msgData = msgData;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DataxRecvRawMsg other = (DataxRecvRawMsg) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRecvFileName() == null ? other.getRecvFileName() == null : this.getRecvFileName().equals(other.getRecvFileName()))
            && (this.getRecvDataType() == null ? other.getRecvDataType() == null : this.getRecvDataType().equals(other.getRecvDataType()))
            && (this.getCommunType() == null ? other.getCommunType() == null : this.getCommunType().equals(other.getCommunType()))
            && (this.getCommunParam() == null ? other.getCommunParam() == null : this.getCommunParam().equals(other.getCommunParam()))
            && (this.getBackupTime() == null ? other.getBackupTime() == null : this.getBackupTime().equals(other.getBackupTime()))
            && (this.getDataSize() == null ? other.getDataSize() == null : this.getDataSize().equals(other.getDataSize()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getMsgCharset() == null ? other.getMsgCharset() == null : this.getMsgCharset().equals(other.getMsgCharset()))
            && (this.getMsgType() == null ? other.getMsgType() == null : this.getMsgType().equals(other.getMsgType()))
            && (this.getMsgData() == null ? other.getMsgData() == null : this.getMsgData().equals(other.getMsgData()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRecvFileName() == null) ? 0 : getRecvFileName().hashCode());
        result = prime * result + ((getRecvDataType() == null) ? 0 : getRecvDataType().hashCode());
        result = prime * result + ((getCommunType() == null) ? 0 : getCommunType().hashCode());
        result = prime * result + ((getCommunParam() == null) ? 0 : getCommunParam().hashCode());
        result = prime * result + ((getBackupTime() == null) ? 0 : getBackupTime().hashCode());
        result = prime * result + ((getDataSize() == null) ? 0 : getDataSize().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getMsgCharset() == null) ? 0 : getMsgCharset().hashCode());
        result = prime * result + ((getMsgType() == null) ? 0 : getMsgType().hashCode());
        result = prime * result + ((getMsgData() == null) ? 0 : getMsgData().hashCode());
        return result;
    }
    
    public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}
}